// 代码块 importM
import 'package:flutter/material.dart';

import './pages/tabs.dart';
import './routers/routers.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {

  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      theme: ThemeData(
        primarySwatch: Colors.blue,
        appBarTheme: const AppBarTheme(
          centerTitle: true, // 标题居中
        )
      ),
      // home: const HomePage(),
      initialRoute: "/",
      // 配置onGenerateRoute 固定写法
      onGenerateRoute: onGenerateRoute,
    );
  }
}

class HomePage extends StatelessWidget {
  const HomePage({super.key});

  @override
  Widget build(BuildContext context) {
    return const Tabs();
  }
}
